Policies Wiki:Portability
All copy-policies on this wiki are to be designed in such a way that they should be one hundred percent copyable to other wikis, with absolutely zero modifications. That is, copying the wikitext from one wiki to another, verbatim, shall produce a useful policy with: *no redlinks *no links to templates that will not exist *links to other Policy Wiki pages, if they exist This concept shall be known as a policy's portability. Several levels of trickery will be used to ensure this goal is attained. Hiatus Portability is complicated, and won't be worried about until the wiki has taken off to some extent. SITENAME check :See also: . The most basic unit of portability enforcement is the SITENAME check. The wikitext syntax for a SITENAME check is: * |Policies Wiki|A}} * |Policies Wiki|A|B}} Either of the above will return the wikitext "A" if the SITENAME for the wiki is equal to "Policies Wiki", which is true on this wiki (and theoretically nowhere else). If that condition is not met (that is, the SITENAME does not equal "Policies Wiki"), the second example alone will return "B" while the first returns nothing at all. This is useful for hiding templates and the like that are not intended to be seen on the end user's wiki. Links to other policies Copy-policies on this wiki shall be located in the Project: namespace (example: "Project:Chat policy"). Unlike other wikis, the Project: namespace will not alias to the namespace of the wiki, but will remain literally in a Project: namespace. Note that a separate "Policies Wiki:" namespace like that of this page exists: for more explanation of the unique namespaces of this wiki, see Policies Wiki:Namespaces. Copy-policies can easily link to one another on this wiki, with format Project:Chat policy. When the copy-policies are transferred to another wiki, they will still correctly link, because "Project:" should alias to the project namespace (for example, on w:c:wolfenstein, "Project:Policy" aliases to "Wolfenstein Wiki:Policy"). End-users shall be encouraged to create redirects to make their policies easier to find, however since this is optional, copy-policies should never link to redirects. Existence check Two copy-policies on this wiki can easily link to each other, and link with the same format if copied to another wiki. However if the user chooses to transfer only one of the two policies, which happens to link to the other, then a redlink would be created, violating the guidelines set forth above. To account for this, all links to other policies shall use the #ifexist , and be in a format similar to: * That code checks if the first parameter "Project:Chat policy" exists, returns the second parameter (a proper link to Project:Chat policy) if the page "Project:Chat policy" exists in the first place, failing that, returns the third parameter (placeholder text "chat policy"). Policy comments Another useful tool is the policy comment. Template:PolicyComment is a template for creating comments on policies, which will have a very notable color scheme. All PolicyComments, and indeed all end-user-hidden materials, must be SITENAME-checked and negated, so as not to link to nonexistent templates.